package com.boot.security.server.common;


public class QueryListReq<T> {
    private int pageNo = 1;
    private int pageSize = 10;
    private T params;


    /**
     * 开始的记录数
     *
     * @return
     */
    public int getStartNum() {
        return (pageNo - 1) * pageSize;
    }

    /**
     * 结束的记录数
     *
     * @return
     */
    public int getEndNum() {
        // 页数＊每页行数
        return this.getStartNum() + pageNo * pageSize;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public T getParams() {
        return params;
    }

    public void setParams(T param) {
        this.params = param;
    }

}
